001 /*
002 * Copyright 2006 Stephen McConnell.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package net.dpml.http;
017
018 /**
019 * Common connector context contract.
020 * @author <a href="http://www.dpml.net">Digital Product Meta Library</a>
021 * @version 0.0.1
022 */
023 public interface ConnectorContext
024 {
025 /**
026 * Return the connector host name.
027 * @param host implementation defined default value
028 * @return the supplied value unless overriden in the deployment configuration
029 */
030 String getHost( String host );
031
032 /**
033 * Return the connector port.
034 * @return the assigned connector port
035 */
036 int getPort();
037
038 /**
039 * Return the connector header buffer size.
040 * @param size implementation defined default value
041 * @return the supplied value unless overriden in the deployment configuration
042 */
043 int getHeaderBufferSize( int size );
044
045 /**
046 * Return the maximum idle time in milliseconds.
047 * @param time implementation defined default value
048 * @return the supplied value unless overriden in the deployment configuration
049 */
050 int getMaxIdleTime( int time );
051
052 /**
053 * Return the request buffer size.
054 * @param size implementation defined default value
055 * @return the supplied value unless overriden in the deployment configuration
056 */
057 int getRequestBufferSize( int size );
058
059 /**
060 * Return the response buffer size.
061 * @param size implementation defined default value
062 * @return the supplied value unless overriden in the deployment configuration
063 */
064 int getResponseBufferSize( int size );
065
066 /**
067 * Return the accept queue size.
068 * @param size implementation defined default value
069 * @return the supplied value unless overriden in the deployment configuration
070 */
071 int getAcceptQueueSize( int size );
072
073 /**
074 * Return the number of initial acceptors.
075 * @param size implementation defined default value
076 * @return the supplied value unless overriden in the deployment configuration
077 */
078 int getAcceptors( int size );
079
080 /**
081 * Return the soLingerTime parameter value.
082 * @param time implementation defined default value
083 * @return the supplied value unless overriden in the deployment configuration
084 */
085 int getSoLingerTime( int time );
086
087 /**
088 * Return the confidential port.
089 * @param port implementation defined default value
090 * @return the supplied value unless overriden in the deployment configuration
091 */
092 int getConfidentialPort( int port );
093
094 /**
095 * Return the confidential scheme (http or https).
096 * @param scheme implementation defined default value
097 * @return the supplied value unless overriden in the deployment configuration
098 */
099 String getConfidentialScheme( String scheme );
100
101 /**
102 * Return the integral port.
103 * @param port implementation defined default value
104 * @return the supplied value unless overriden in the deployment configuration
105 */
106 int getIntegralPort( int port );
107
108 /**
109 * Return the integral scheme (http or https).
110 * @param scheme implementation defined default value
111 * @return the supplied value unless overriden in the deployment configuration
112 */
113 String getIntegralScheme( String scheme );
114
115 }